//
//  YMNetLib.h
//  MyProject
//
//  Created by Pei on 16/6/19.
//  Copyright © 2016年 Xiaobo Pei. All rights reserved.
//
#import "AFHTTPSessionManager.h"


@protocol YMNetLibDelegate <NSObject>

@required
- (void)NetDoOverSuccess:(NSDictionary*)body;
@optional
- (void)NetDoOverFaild:(NSDictionary*)body;
- (void)NetDoOverWithErrMsgRspCode:(NSString*)RSP_CODE andErrMsg:(NSString*)msg;
@end

@interface YMNetLib : NSObject<UIAlertViewDelegate>

@property (nonatomic) BOOL hostReachable;
@property (nonatomic, weak) id<YMNetLibDelegate> delegate;
@property (weak, nonatomic) id myObject;
+ (YMNetLib *) getInstance;
//- (void)connectWithAction:(NSString *)action withParam:(NSData*)postData withDelegate:(id)del isCurrentView:(BOOL)isYes;
//- (void)connectWithAction:(NSString *)action withContent:(NSString*)content withDelegate:(id)del;

- (void)connectWithAction:(NSString *)action method:(NSString*)method withContent:(NSString*)content withBody:(NSDictionary*)body withDelegate:(id)del;
@end
